<!--<div class="form">-->
<?php
//    Util::tsRegisterAssetJs('ninios.js');

/** @var NiniosController $this */
/** @var Ninios $model */
/** @var AweActiveForm $form */
$form = $this->beginWidget('ext.AweCrud.components.AweActiveForm', array(
    'id' => 'ninios-form',
    'enableAjaxValidation' => false,
    'action' => Yii::app()->baseUrl . '/index.php/ninio/ninios/guardarCartaNinios',
    'enableClientValidation' => true,
        ));
?>
<div class="row-fluid sortable span9">
    <div class="box">
        <div class="box-header well" data-original-title>
            <h2>
<!--                <i class="icon-list"></i> -->
                 Menú para niños  
            </h2>
            <div class="box-icon">
                <a href="#" class="btn btn-minimize btn-round"><i class="icon-chevron-up"></i> </a> 
            </div>
        </div>

        <div class="box-content">
            <?php echo $form->dropDownListRow($model, 'manyNiniosCartaNutricionals', array('' => ' -- Seleccione -- ') + CHtml::listData(CartaNutricional::model()->findAll(), 'id', CartaNutricional::representingColumn())) ?>
            <div>
                <?php
                $dataProvider = new Ninios('search');
                $this->widget('ext.selgridview.BootSelGridView', array(
                    'id' => 'ninios-grid',
                    'type' => 'striped bordered hover advance',
                    'selectableRows' => 2,
                    'dataProvider' => $dataProvider->search(),
                    'columns' => array(
                        array(
                            'name' => 'id_cartaNinios',
                            'id' => 'check',
                            'class' => 'CCheckBoxColumn',
                            'value' => '$data->id',
                        ),
                        array(
                            'name' => 'nombres',
                            'header' => 'Ninios',
                            'value' => '$data->nombres',
                        ),
                    ),
                ));
                ?>
            </div>

            <div class="form-actions">
                <?php
                $this->widget('bootstrap.widgets.TbButton', array(
                    'buttonType' => 'submit',
                    'type' => 'primary',
                    'label' => $model->isNewRecord ? Yii::t('AweCrud.app', 'Create') : Yii::t('AweCrud.app', 'Save'),
                ));
                ?>
                <?php
                $this->widget('bootstrap.widgets.TbButton', array(
                    //'buttonType'=>'submit',
                    'label' => Yii::t('AweCrud.app', 'Cancel'),
                    'htmlOptions' => array('onclick' => 'javascript:history.go(-1)')
                ));
                ?>
            </div>

            <?php
            $this->endWidget();
// var_dump($_POST);
            ?>
        </div>
    </div>
</div>
<!--</div>-->